package com.fognl.core.net.handler.request;

import java.net.URL;
import java.util.HashMap;
import java.util.Map;

import com.fognl.core.net.handler.AbstractRequest;

public abstract class HttpRequest extends AbstractRequest
{
	public final static String DEFAULT_ENCODING = "utf-8";
	
	private URL url;
	private Map<String, String> params = new HashMap<String, String>();
	private String encoding = DEFAULT_ENCODING;
	
	public HttpRequest() 
	{
		super();
	}
	
	public HttpRequest(URL url)
	{
		super();
		this.url = url;
	}
	
	public String getEncoding() { return encoding; }
	public HttpRequest setEncoding(String enc) { encoding = enc; return this; }
	
	public URL getUrl() { return url; }
	public HttpRequest setUrl(URL url) { this.url = url; return this; }
	
	public Map<String, String> getParams() { return params; }
	public HttpRequest setParams(Map<String, String> params) { this.params = params; return this; }
	
	public String toString()
	{
		return url.toString();
	}
}
